﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XjjXmm.Spider
{
    /// <summary>
    ///  需要抓取的放入此表
    /// </summary>
    [SugarTable("Novel")]
    internal class NovelPoolEntity
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity=true)]
        public int Id { get; set; }

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 作者
        /// </summary>
        [SugarColumn(ColumnName = "author")]
        public string Author { get; set; } = "";

        /// <summary>
        /// 网站地址
        /// </summary>
        [SugarColumn(ColumnName = "domain")]
        public string Domain { get; set; } = "";

        /// <summary>
        /// 小说地址
        /// </summary>
        [SugarColumn(ColumnName = "link")]
        public string Link { get; set; } = "";

        /// <summary>
        /// 抓取撞他 0：未开始， 1： 抓取中 2： 抓取完成
        /// </summary>
        [SugarColumn(ColumnName = "is_finished")]
        public bool IsFinished { get; set; }


        /// <summary>
        /// 抓取撞他 0：未开始， 1： 抓取中 2： 抓取完成
        /// </summary>
        [SugarColumn(ColumnName = "is_generator")]
        public bool IsGenerator { get; set; }  = false;

        // [SugarColumn(IsIgnore = true)]
        // public IEnumerable<Chapter> Chapters { get; set; }
    }
}
